package br.ufpe.abaco.ParserGen;

import java.io.Serializable;

public interface ParserGenFacade extends Serializable  {

    //Sets if the generated compiler will produce syntax trees or post-fix lists
    void generateTree(boolean g);

    //Constructs the grammar
    void terminal(String tokenName,String regExp,boolean retNull) throws CompilerException;
    void comment(String regExp) throws CompilerException;
    void nonTerminal(String name);
    void setStartSymbol(String name);
    void addProduction(String left, String right, final Object operator);
    void addProduction(String left, String right[], final Object operator);

    //Initializes the compiler tables before recognizes input
    void processCompiler();
    

    //Process a source
    Object compile(String source)  throws CompilerException;
}
